<template>
  <v-chart autoresize :options="options" style="width:100%;height:100%;" />
</template>

<script>
import 'echarts/lib/chart/line'
import 'echarts/lib/chart/bar'
import 'echarts/lib/chart/pie'
import 'echarts/lib/component/tooltip'
import 'echarts/lib/component/legend'
import { graphic } from 'echarts/lib/export'

export default {
  name: 'BarChart',
  computed: {
    options() {
      return {
        color: ['#629bff'],
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'shadow'
          },
        },
        grid: {
          left: '0%',
          right: '0%',
          bottom: '0%',
          containLabel: true
        },
        xAxis: [
          {
            type: 'category',
            data: [
              '污水处理厂',
              '造纸  ',
              '化工 ',
              '焦化 ',
              '食品制造 ',
              '煤炭 ',
              '机械制造',
              '电力'
            ],
            axisLabel: {
              show: true,
              textStyle: {
                color: '#000000', // 更改坐标轴文字颜色
                fontSize: 13, // 更改坐标轴文字大小
              }
            },
            lineStyle: {
              color: '#e9ecf1',
            },
            axisLine: {
              lineStyle: {
                color: '#e9ecf1',
              },
            },
            axisTick: {
              show: false,
            },
            splitLine: {
              show: false,
              lineStyle: {
                color: ['#e9ecf1'],
                width: 1,
                type: 'solid',
              },
            }
          }
        ],
        yAxis: [
          {
            type: 'value',
            axisLabel: {
              show: true,
              textStyle: {
                color: '#000000', // 更改坐标轴文字颜色
                fontSize: 13, // 更改坐标轴文字大小
              }
            },
            axisLine: {
              show: true,
              lineStyle: {
                color: '#e9ecf1',
              },
            },
            axisTick: {
              show: false,
            },
            splitLine: {
              show: true,
              lineStyle: {
                color: ['#e9ecf1'],
                width: 1,
                type: 'solid',
              },
            }
          }
        ],
        series: [
          {
            name: '烟尘区域统计',
            type: 'bar',
            data: [10, 52, 200, 334, 390, 330, 220],
            barWidth: 10,
            itemStyle: {
              normal: {
                barBorderRadius: [3, 3, 0, 0]
              }
            },
          }
        ]
      }
    }
  }
}
</script>

<style scoped>

</style>
